package cn.edu.ctbu.dp2.exception;


import cn.edu.ctbu.dp2.constant.REnum;
import lombok.Getter;
import lombok.Setter;

/**
 * 扩展运行性异常
 */
@Getter
@Setter
public class RException extends RuntimeException {

    private Integer code;

    public RException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public RException(REnum rEnum){
        super(rEnum.getmsg());
        this.code = rEnum.getCode();
    }





}
